/**
 * @version 1.0
 * @created 07 December 2010
 *
 * AuthenticatedUser
 *
 * Copyright @ 2010
 * All Rights Reserved.
 * CONFIDENTIAL AND TRADE SECRET
 * 
 */
package com.ces.knacky.framework.security.model;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
/**
 * Bean class to represent authenticated user. It inherits <class>User</class> which is provided
 * by spring-security framework.  
 * 
 * @author bipul_sinha
 *
 */
public class AuthenticatedUser extends User {
	/**
	 * Represents User email address.
	 */
	private String email;
	
	public AuthenticatedUser(String username, String password, String email, boolean enabled,
			boolean accountNonExpired, boolean credentialsNonExpired,
			boolean accountNonLocked, GrantedAuthority[] authorities)
			throws IllegalArgumentException {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired,
				accountNonLocked, authorities);
		this.email = email;
		
	}

	/**
	 * Represents email address of the logging user.
	 * 
	 * @return  String
	 * 			Represents email address of the logging user.
	 */
	public String getEmail() {
		return email;
	}
}
